package com.wzh.service;

import com.wzh.pojo.Knowledge;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KnowledgeService {

    @Autowired
    private com.wzh.dao.knowledgeDao knowledgeDao;

    public List<Knowledge> getAll(){
        return knowledgeDao.getAll();
    }

    public boolean insert(Knowledge knowledge){
        return knowledgeDao.insert(knowledge) > 0;
    }

    public boolean delete(String name){
        return knowledgeDao.delete(name) > 0;
    }
}
